cmake_minimum_required(VERSION 3.30)
project(WebServerAsio)

set(CMAKE_CXX_STANDARD 20)

include_directories(./include ./utils)
include_directories(D:/Depend/boost_1_86_0)
include_directories(D:/Depend/cpp-depend/hiredis/include)
include_directories(D:/Depend/cpp-depend/mysql-connector-8/include)
include_directories(D:/Depend/cpp-depend/jwt-cpp/include)
include_directories(D:/Depend/cpp-depend/OpenSSL-Win64/include)

set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin)

add_executable(WebServerAsio main.cpp
        utils/inicpp.hpp
        utils/Utils.hpp
        utils/Config.h

        include/const.h
        include/Server.h
        include/HttpConnection.h
        include/IOServicePool.h
        include/LogicSystem.h
        include/MySQLDao.h
        include/RedisMng.h
        include/Singleton.h

        src/Server.cpp
        src/HttpConnection.cpp
        src/IOServicePool.cpp
        src/LogicSystem.cpp
        src/MySQLDao.cpp
        src/RedisMng.cpp
)


target_link_directories(WebServerAsio PRIVATE D:/Depend/boost_1_86_0/stage/lib)
target_link_directories(WebServerAsio PRIVATE D:/Depend/cpp-depend/hiredis/lib)
target_link_directories(WebServerAsio PRIVATE D:/Depend/cpp-depend/mysql-connector-8/lib64)
target_link_directories(WebServerAsio PRIVATE D:/Depend/cpp-depend/OpenSSL-Win64/lib/VC/x64/MDd)

target_link_libraries(WebServerAsio ws2_32 mswsock)
target_link_libraries(WebServerAsio hiredisd.lib mysqlcppconn.lib mysqlcppconn8.lib libssl.lib libcrypto.lib)